/*
 Navicat Premium Data Transfer

 Source Server         : 47.106.80.184
 Source Server Type    : SQL Server
 Source Server Version : 14003451
 Source Host           : 47.106.80.184:9205
 Source Catalog        : IMOM3.0
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 14003451
 File Encoding         : 65001

 Date: 29/08/2022 14:46:48
*/


-- ----------------------------
-- Table structure for xxl_job_group
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[xxl_job_group]') AND type IN ('U'))
DROP TABLE [dbo].[xxl_job_group]
    GO

CREATE TABLE [dbo].[xxl_job_group] (
    [app_name] nvarchar(64) COLLATE Chinese_PRC_CI_AI  NOT NULL,
    [title] nvarchar(12) COLLATE Chinese_PRC_CI_AI  NOT NULL,
    [address_type] tinyint  NOT NULL,
    [address_list] nvarchar(512) COLLATE Chinese_PRC_CI_AI  NULL,
    [update_time] datetime2(7)  NULL,
    [id] int  IDENTITY(1,1) NOT NULL
    )
    GO

ALTER TABLE [dbo].[xxl_job_group] SET (LOCK_ESCALATION = TABLE)
    GO


    -- ----------------------------
-- Records of xxl_job_group
-- ----------------------------
    SET IDENTITY_INSERT [dbo].[xxl_job_group] ON
    GO

    INSERT INTO [dbo].[xxl_job_group] ([app_name], [title], [address_type], [address_list], [update_time], [id]) VALUES (N'xxl-job-executor-sample', N'示例执行器', N'0', NULL, N'2022-08-29 14:36:28.0000000', N'1')
    GO

    SET IDENTITY_INSERT [dbo].[xxl_job_group] OFF
    GO


    -- ----------------------------
-- Table structure for xxl_job_info
-- ----------------------------
    IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[xxl_job_info]') AND type IN ('U'))
DROP TABLE [dbo].[xxl_job_info]
    GO

CREATE TABLE [dbo].[xxl_job_info] (
    [id] int  IDENTITY(1,1) NOT NULL,
    [job_group] int  NOT NULL,
    [job_desc] nvarchar(255) COLLATE Chinese_PRC_CI_AI  NOT NULL,
    [add_time] datetime2(7)  NULL,
    [update_time] datetime2(7)  NULL,
    [author] nvarchar(64) COLLATE Chinese_PRC_CI_AI  NULL,
    [alarm_email] nvarchar(255) COLLATE Chinese_PRC_CI_AI  NULL,
    [schedule_type] nvarchar(50) COLLATE Chinese_PRC_CI_AI  NULL,
    [schedule_conf] nvarchar(128) COLLATE Chinese_PRC_CI_AI  NULL,
    [misfire_strategy] nvarchar(50) COLLATE Chinese_PRC_CI_AI  NULL,
    [executor_route_strategy] nvarchar(50) COLLATE Chinese_PRC_CI_AI  NULL,
    [executor_handler] nvarchar(255) COLLATE Chinese_PRC_CI_AI  NULL,
    [executor_param] nvarchar(512) COLLATE Chinese_PRC_CI_AI  NULL,
    [executor_block_strategy] nvarchar(50) COLLATE Chinese_PRC_CI_AI  NULL,
    [executor_timeout] int DEFAULT ((0)) NOT NULL,
    [executor_fail_retry_count] int DEFAULT ((0)) NOT NULL,
    [glue_type] nvarchar(50) COLLATE Chinese_PRC_CI_AI  NOT NULL,
    [glue_source] nvarchar(max) COLLATE Chinese_PRC_CI_AI  NULL,
    [glue_remark] nvarchar(128) COLLATE Chinese_PRC_CI_AI  NULL,
    [glue_updatetime] datetime2(7)  NULL,
    [child_jobid] nvarchar(255) COLLATE Chinese_PRC_CI_AI  NULL,
    [trigger_status] tinyint DEFAULT ((0)) NOT NULL,
    [trigger_last_time] bigint DEFAULT ((0)) NOT NULL,
    [trigger_next_time] bigint DEFAULT ((0)) NOT NULL
    )
    GO

ALTER TABLE [dbo].[xxl_job_info] SET (LOCK_ESCALATION = TABLE)
    GO


    -- ----------------------------
-- Records of xxl_job_info
-- ----------------------------
    SET IDENTITY_INSERT [dbo].[xxl_job_info] ON
    GO

    INSERT INTO [dbo].[xxl_job_info] ([id], [job_group], [job_desc], [add_time], [update_time], [author], [alarm_email], [schedule_type], [schedule_conf], [misfire_strategy], [executor_route_strategy], [executor_handler], [executor_param], [executor_block_strategy], [executor_timeout], [executor_fail_retry_count], [glue_type], [glue_source], [glue_remark], [glue_updatetime], [child_jobid], [trigger_status], [trigger_last_time], [trigger_next_time]) VALUES (N'1', N'1', N'测试任务1', N'2018-11-03 22:21:31.0000000', N'2018-11-03 22:21:31.0000000', N'XXL', N'', N'CRON', N'0 0 0 * * ? *', N'DO_NOTHING', N'FIRST', N'demoJobHandler', N'', N'SERIAL_EXECUTION', N'0', N'0', N'BEAN', N'', N'GLUE代码初始化', N'2018-11-03 22:21:31.0000000', N'', N'0', N'0', N'0')
    GO

    SET IDENTITY_INSERT [dbo].[xxl_job_info] OFF
    GO


    -- ----------------------------
-- Table structure for xxl_job_lock
-- ----------------------------
    IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[xxl_job_lock]') AND type IN ('U'))
DROP TABLE [dbo].[xxl_job_lock]
    GO

CREATE TABLE [dbo].[xxl_job_lock] (
    [lock_name] nvarchar(50) COLLATE Chinese_PRC_CI_AI  NOT NULL
    )
    GO

ALTER TABLE [dbo].[xxl_job_lock] SET (LOCK_ESCALATION = TABLE)
    GO


    -- ----------------------------
-- Records of xxl_job_lock
-- ----------------------------
    INSERT INTO [dbo].[xxl_job_lock] ([lock_name]) VALUES (N'schedule_lock')
    GO


    -- ----------------------------
-- Table structure for xxl_job_log
-- ----------------------------
    IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[xxl_job_log]') AND type IN ('U'))
DROP TABLE [dbo].[xxl_job_log]
    GO

CREATE TABLE [dbo].[xxl_job_log] (
    [id] int  IDENTITY(1,1) NOT NULL,
    [job_group] int  NOT NULL,
    [job_id] int  NOT NULL,
    [executor_address] varchar(255) COLLATE Chinese_PRC_CI_AI DEFAULT NULL NULL,
    [executor_handler] varchar(255) COLLATE Chinese_PRC_CI_AI DEFAULT NULL NULL,
    [executor_param] varchar(512) COLLATE Chinese_PRC_CI_AI DEFAULT NULL NULL,
    [executor_sharding_param] varchar(20) COLLATE Chinese_PRC_CI_AI DEFAULT NULL NULL,
    [executor_fail_retry_count] int DEFAULT ('0') NOT NULL,
    [trigger_time] datetime DEFAULT NULL NULL,
    [trigger_code] int  NOT NULL,
    [trigger_msg] text COLLATE Chinese_PRC_CI_AI  NULL,
    [handle_time] datetime DEFAULT NULL NULL,
    [handle_code] int  NOT NULL,
    [handle_msg] text COLLATE Chinese_PRC_CI_AI  NULL,
    [alarm_status] tinyint DEFAULT ('0') NOT NULL
    )
    GO

ALTER TABLE [dbo].[xxl_job_log] SET (LOCK_ESCALATION = TABLE)
    GO


    -- ----------------------------
-- Records of xxl_job_log
-- ----------------------------
    SET IDENTITY_INSERT [dbo].[xxl_job_log] ON
    GO

    SET IDENTITY_INSERT [dbo].[xxl_job_log] OFF
    GO


    -- ----------------------------
-- Table structure for xxl_job_log_report
-- ----------------------------
    IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[xxl_job_log_report]') AND type IN ('U'))
DROP TABLE [dbo].[xxl_job_log_report]
    GO

CREATE TABLE [dbo].[xxl_job_log_report] (
    [TRIGGER_DAY] datetime2(7)  NULL,
    [RUNNING_COUNT] int  NULL,
    [SUC_COUNT] int  NULL,
    [FAIL_COUNT] int  NULL,
    [update_time] datetime2(7)  NOT NULL,
    [ID] int  IDENTITY(1,1) NOT NULL
    )
    GO

ALTER TABLE [dbo].[xxl_job_log_report] SET (LOCK_ESCALATION = TABLE)
    GO


    -- ----------------------------
-- Records of xxl_job_log_report
-- ----------------------------
    SET IDENTITY_INSERT [dbo].[xxl_job_log_report] ON
    GO

    SET IDENTITY_INSERT [dbo].[xxl_job_log_report] OFF
    GO


    -- ----------------------------
-- Table structure for xxl_job_logglue
-- ----------------------------
    IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[xxl_job_logglue]') AND type IN ('U'))
DROP TABLE [dbo].[xxl_job_logglue]
    GO

CREATE TABLE [dbo].[xxl_job_logglue] (
    [id] int  IDENTITY(1,1) NOT NULL,
    [job_id] int  NOT NULL,
    [glue_type] nvarchar(50) COLLATE Chinese_PRC_CI_AI  NOT NULL,
    [glue_source] nvarchar(max) COLLATE Chinese_PRC_CI_AI  NOT NULL,
    [update_time] datetime2(7)  NULL,
    [glue_remark] varchar(255) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [add_time] datetime2(7)  NULL
    )
    GO

ALTER TABLE [dbo].[xxl_job_logglue] SET (LOCK_ESCALATION = TABLE)
    GO


    -- ----------------------------
-- Records of xxl_job_logglue
-- ----------------------------
    SET IDENTITY_INSERT [dbo].[xxl_job_logglue] ON
    GO

    SET IDENTITY_INSERT [dbo].[xxl_job_logglue] OFF
    GO


    -- ----------------------------
-- Table structure for xxl_job_registry
-- ----------------------------
    IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[xxl_job_registry]') AND type IN ('U'))
DROP TABLE [dbo].[xxl_job_registry]
    GO

CREATE TABLE [dbo].[xxl_job_registry] (
    [id] int  IDENTITY(1,1) NOT NULL,
    [registry_group] nvarchar(255) COLLATE Chinese_PRC_CI_AI  NOT NULL,
    [registry_key] nvarchar(255) COLLATE Chinese_PRC_CI_AI  NOT NULL,
    [registry_value] nvarchar(255) COLLATE Chinese_PRC_CI_AI  NOT NULL,
    [update_time] datetime2(7)  NOT NULL
    )
    GO

ALTER TABLE [dbo].[xxl_job_registry] SET (LOCK_ESCALATION = TABLE)
    GO


    -- ----------------------------
-- Records of xxl_job_registry
-- ----------------------------
    SET IDENTITY_INSERT [dbo].[xxl_job_registry] ON
    GO

    SET IDENTITY_INSERT [dbo].[xxl_job_registry] OFF
    GO


    -- ----------------------------
-- Table structure for xxl_job_user
-- ----------------------------
    IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[xxl_job_user]') AND type IN ('U'))
DROP TABLE [dbo].[xxl_job_user]
    GO

CREATE TABLE [dbo].[xxl_job_user] (
    [username] nvarchar(50) COLLATE Chinese_PRC_CI_AI  NOT NULL,
    [password] nvarchar(50) COLLATE Chinese_PRC_CI_AI  NOT NULL,
    [role] tinyint  NOT NULL,
    [permission] nvarchar(255) COLLATE Chinese_PRC_CI_AI  NULL,
    [id] int  IDENTITY(1,1) NOT NULL
    )
    GO

ALTER TABLE [dbo].[xxl_job_user] SET (LOCK_ESCALATION = TABLE)
    GO


    -- ----------------------------
-- Records of xxl_job_user
-- ----------------------------
    SET IDENTITY_INSERT [dbo].[xxl_job_user] ON
    GO

    INSERT INTO [dbo].[xxl_job_user] ([username], [password], [role], [permission], [id]) VALUES (N'admin', N'e10adc3949ba59abbe56e057f20f883e', N'1', N'1', N'1')
    GO

    SET IDENTITY_INSERT [dbo].[xxl_job_user] OFF
    GO


    -- ----------------------------
-- Auto increment value for xxl_job_group
-- ----------------------------
    DBCC CHECKIDENT ('[dbo].[xxl_job_group]', RESEED, 1)
    GO


    -- ----------------------------
-- Auto increment value for xxl_job_info
-- ----------------------------
    DBCC CHECKIDENT ('[dbo].[xxl_job_info]', RESEED, 1)
    GO


-- ----------------------------
-- Primary Key structure for table xxl_job_info
-- ----------------------------
ALTER TABLE [dbo].[xxl_job_info] ADD CONSTRAINT [PK__xxl_job___3213E83F8DCC6DAE] PRIMARY KEY CLUSTERED ([id])
    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
    ON [PRIMARY]
    GO


    -- ----------------------------
-- Auto increment value for xxl_job_log
-- ----------------------------
    DBCC CHECKIDENT ('[dbo].[xxl_job_log]', RESEED, 1)
    GO


-- ----------------------------
-- Indexes structure for table xxl_job_log
-- ----------------------------
CREATE NONCLUSTERED INDEX [I_trigger_time]
ON [dbo].[xxl_job_log] (
  [trigger_time] ASC
)
GO

CREATE NONCLUSTERED INDEX [I_handle_code]
ON [dbo].[xxl_job_log] (
  [handle_code] ASC
)
GO


-- ----------------------------
-- Auto increment value for xxl_job_log_report
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[xxl_job_log_report]', RESEED, 1)
GO


-- ----------------------------
-- Indexes structure for table xxl_job_log_report
-- ----------------------------
CREATE NONCLUSTERED INDEX [i_trigger_day]
ON [dbo].[xxl_job_log_report] (
  [TRIGGER_DAY] ASC
)
GO


-- ----------------------------
-- Auto increment value for xxl_job_logglue
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[xxl_job_logglue]', RESEED, 1)
GO


-- ----------------------------
-- Auto increment value for xxl_job_registry
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[xxl_job_registry]', RESEED, 1)
GO


-- ----------------------------
-- Indexes structure for table xxl_job_registry
-- ----------------------------
CREATE NONCLUSTERED INDEX [i_g_k_v]
ON [dbo].[xxl_job_registry] (
  [registry_group] ASC,
  [registry_key] ASC,
  [registry_value] ASC
)
GO


-- ----------------------------
-- Auto increment value for xxl_job_user
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[xxl_job_user]', RESEED, 1)
GO


-- ----------------------------
-- Indexes structure for table xxl_job_user
-- ----------------------------
CREATE UNIQUE NONCLUSTERED INDEX [i_username]
ON [dbo].[xxl_job_user] (
  [username] ASC
)
GO

